<template>
	<view class="box">
		
		<view class="btn2" @click="outLogin">
			清除缓存
		</view>
		

	</view>
</template>

<script>
	import { hex } from "js-md5"
import {myuser,cleanupWx} from "../../api/user.js"
	export default {
		data() {
			return {
				baseUrl: this.$imageBaseUrl,
				info:{},
				unbindShow:false,
				outShow:false,
				secreShow:false
			}
		},
		onLoad() {
	 
		},
		onShow() {
			
		},
		onReady() {
		},
		methods: {
			
			
			// 退出登录
			outLogin(){
				// 清除所有缓存
				// #ifdef H5
				var url = window.location.href;
				var baseUrl = url.split('?')[0];
				var queryString = url.split('?')[1];
					
				if (queryString) {
				    var params = queryString.split('&');
				    var filteredParams = params.filter(param => {
				        return!param.startsWith('code=') &&!param.startsWith('state=');
				    });
					
				    if (filteredParams.length > 0) {
				        var newQueryString = filteredParams.join('&');
				        var newUrl = baseUrl + '?' + newQueryString;
				    } else {
				        var newUrl = baseUrl;
				    }
				} else {
				    var newUrl = baseUrl;
					
				}
				console.log("newurl",newUrl)
				window.history.replaceState({}, document.title, newUrl+"?pageLogin/login/login");
				// #endif
				uni.$u.toast('清除成功');
				uni.clearStorageSync();
				setTimeout(function() {
					uni.reLaunch({
						url:'/pageLogin/login/login'
					})
				}, 1500);
			},
		},
	}
</script>

<style lang="scss">
.box{
	width: 750rpx;
	height: 100vh;
	background: #F7F7F7;
}
.main{
width: 750rpx;
// height: 642rpx;
background: #FFFFFF;
border-radius: 0rpx 0rpx 0rpx 0rpx;
// margin-top: 40rpx;
}
.mainitem{
	width: 690rpx;
	height: 92rpx;
	margin: 0 auto;
	border-bottom:2rpx solid #F7F7F7;
	display: flex;
	align-items: center;
	justify-content: space-between;
	>text{
		font-weight: 400;
		font-size: 30rpx;
		color: #3D3D3D;
	}
	>image{
		width: 14rpx;
		height: 28rpx;
	}
}
.mianmi>text{
	margin-right: 14rpx;
}
.mianmi>image{
	width: 14rpx;
	height: 28rpx;
}
.empty{
	width: 750rpx;
	height: 24rpx;
	background: #F7F7F7;
}
.btn{
	position: fixed;
	left: 50%;
	bottom: 240rpx;
	width: 690rpx;
	height: 90rpx;
	transform: translateX(-50%);
	background: #ffffff;
	border-radius: 0rpx 0rpx 0rpx 0rpx;
	text-align: center;
	line-height: 90rpx;
	font-weight: 400;
	font-size: 30rpx;
	color: #3D3D3D;
	border-radius: 8rpx;
}
.btn2{
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 60rpx;
	width: 690rpx;
	height: 90rpx;
	background: #FFC300;
	border-radius: 0rpx 0rpx 0rpx 0rpx;
	text-align: center;
	line-height: 90rpx;
	font-weight: 400;
	font-size: 30rpx;
	color: #3D3D3D;
	border-radius: 8rpx;
}
.prompt {
		width: 690rpx;
		background: #ffffff;
		margin: 0 auto;
		border-radius: 20rpx;
		padding-top: 10rpx;
		padding-bottom: 40rpx;
	}
	
	.prompt>text {
		margin-top: 40rpx;
	}
	
	.prompt_tit {
		margin: 0 30rpx;
		font-size: 28rpx;
		color: #666666;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		overflow: hidden;
	}
	
	.prompt_ntm {
		width: 100%;
		font-size: 30rpx;
		margin-top: 50rpx;
		text-align: center;
	}
	
	.prompt_ntm>text:nth-child(1) {
		width: 254rpx;
		height: 80rpx;
		line-height: 80rpx;
		text-align: center;
		background: #F2F2F2;
		border-radius: 40rpx;
		color: #333333;
	}
	
	.prompt_ntm>text:nth-child(2) {
		width: 254rpx;
		height: 80rpx;
		line-height: 80rpx;
		text-align: center;
		background: #FFCC28;
		border-radius: 40rpx;
		color: #333333;
	}
</style>
